package com.systemframework.sys.dto.response;

import cn.zhxu.bs.bean.DbField;
import cn.zhxu.bs.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author summer
 * @date 2023-04-04 17:44
 */
@Data
@SearchBean(tables = "email_account e",orderBy = "e.createTime",autoMapTo = "e")
public class EmailAccountResponseDTO implements Serializable {

    private Integer id;

    private String email;

    @DbField("e.username")
    private String username;

    private Integer port;

    private String realm;

    @DbField(value = "(CASE WHEN e.enabledSSL=1 THEN '是' ELSE '否' END )",alias = "sslState")
    private String sslState;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    @DbField("e.createTime")
    private Date createTime;
}
